package me.firstapp.weixin.controller.account;

import java.math.BigDecimal;
import java.util.Date;

import me.firstapp.module.weixin.jinbi.JinBiAccountTrace;

public class JsonJinBiAccountTrace {

	private Long id;
	/**
	 * 积分账户ID
	 */
	private Long weiBiAccountId;

	/**
	 * 变动类型
	 */
	private String changeType;

	/**
	 * 记录类型
	 */
	private String accountRecordType;

	/**
	 * 变动前积分值
	 */
	private BigDecimal beforeValue;

	/**
	 * 变动值
	 */
	private BigDecimal changeValue;

	/**
	 * 变动后积分值
	 */
	private BigDecimal afterValue;

	/**
	 * 变动时间
	 */
	private Date changeTime;

	public JsonJinBiAccountTrace(JinBiAccountTrace jinBiAccountTrace) {
		this.id = jinBiAccountTrace.getId();
		this.weiBiAccountId = jinBiAccountTrace.getJinBiAccountId();
		this.changeType = jinBiAccountTrace.getChangeType().getDesc();
		this.accountRecordType = jinBiAccountTrace.getChangeType().getAccountRecordType().getId();
		this.beforeValue = jinBiAccountTrace.getBeforeValue();
		this.changeValue = jinBiAccountTrace.getChangeValue();
		this.afterValue = jinBiAccountTrace.getAfterValue();
		this.changeTime = jinBiAccountTrace.getChangeTime();
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getWeiBiAccountId() {
		return weiBiAccountId;
	}

	public void setWeiBiAccountId(Long weiBiAccountId) {
		this.weiBiAccountId = weiBiAccountId;
	}

	public String getChangeType() {
		return changeType;
	}

	public void setChangeType(String changeType) {
		this.changeType = changeType;
	}

	public String getAccountRecordType() {
		return accountRecordType;
	}

	public void setAccountRecordType(String accountRecordType) {
		this.accountRecordType = accountRecordType;
	}

	public BigDecimal getBeforeValue() {
		return beforeValue;
	}

	public void setBeforeValue(BigDecimal beforeValue) {
		this.beforeValue = beforeValue;
	}

	public BigDecimal getChangeValue() {
		return changeValue;
	}

	public void setChangeValue(BigDecimal changeValue) {
		this.changeValue = changeValue;
	}

	public BigDecimal getAfterValue() {
		return afterValue;
	}

	public void setAfterValue(BigDecimal afterValue) {
		this.afterValue = afterValue;
	}

	public Date getChangeTime() {
		return changeTime;
	}

	public void setChangeTime(Date changeTime) {
		this.changeTime = changeTime;
	}

}
